GtkButton: don't propagate double-clicks
authorMatthias Clasen <mclasen@redhat.com>
Sat, 16 Nov 2013 04:41:09 +0000 (23:41 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 16 Nov 2013 04:43:05 +0000 (23:43 -0500)
It is basically always unexpected to have a container handle
double-clicks on a widget that handles single-clicks itself.

gtk/gtkbutton.c

index e3725570c1f4c72d2e31c4a98baf2c95e0d003f8..456db7907bb20265878d158a098b95a997d8b633 100644 (file)
@@ -1922,6 +1922,10 @@ gtk_button_button_press (GtkWidget      *widget,
           return GDK_EVENT_STOP;
         }
     }
+  else if (event->type == GDK_2BUTTON_PRESS)
+    {
+      return GDK_EVENT_STOP;
+    }
 
   return GDK_EVENT_PROPAGATE;
 }